package config

import "fmt"

type MySQLConfig struct {
	User     string
	Password string
	IP       string
	Port     int
	DataBase string
}

func MySQL_URL(config MySQLConfig) string {
	return fmt.Sprintf("%s:%s@(%s:%d)/%s?charset=utf8mb4&parseTime=True&loc=Local",
		config.User,
		config.Password,
		config.IP,
		config.Port,
		config.DataBase)
}

var MYSQL_ONLINE = MySQLConfig{
	User:     "root",
	Password: "Zi7d9ZnEC6vY3Nmt",
	IP:       "60.205.219.136",
	Port:     3306,
	DataBase: "std",
}

var MYSQL_TEST = MySQLConfig{
	User:     "root",
	Password: "root",
	IP:       "127.0.0.1",
	Port:     3306,
	DataBase: "std",
}
